package com.logica.mdm.webfrontend.embedding;

import com.logica.mdm.webfrontend.models.party.PartySearchParams;
import com.logica.mdm.webfrontend.models.party.PartySearchResult;

/**
 * Embedding adapter interface, used to call back into the application
 * integrating MDM Web Frontend (if any).
 * @author Fabien Crespel <fabien.crespel@logica.com>
 */
public interface EmbeddingAdapter {
	
	/**
	 * Get the name of this embedding adapter.
	 * @return adapter name
	 */
	String getName();
	
	/**
	 * Get the theme name to use when using this embedding adapter.
	 * @return theme name
	 */
	String getThemeName();
	
	/**
	 * Get the system name (defined in MDM Hub) associated with the embedding application.
	 * @return system name
	 */
	String getSystemName();
	
	/**
	 * Get the URL to use as the home for party objects.
	 * @return party home URL
	 */
	String getPersonsHomeUrl();
	
	/**
	 * Get the URL to use to add a new party.
	 * This method doesn't take any argument.
	 * @return party add URL
	 */
	String getPersonsAddUrl();
	
	/**
	 * Get the URL to use to add a new party.
	 * This method takes search params in argument.
	 * @param partySearchParams
	 * @return party add URL
	 */
	String getPersonsAddUrl(PartySearchParams partySearchParams);
	
	/**
	 * Get the URL to use to add a new party.
	 * This method takes a search result in argument.
	 * @param party
	 * @return party add URL
	 */
	String getPersonsAddUrl(PartySearchResult party);
	
	/**
	 * Get the URL to use to display a party.
	 * @param party
	 * @return party show URL
	 */
	String getPersonsShowUrl(PartySearchResult party);
	
	/**
	 * Get the URL to use to edit a party.
	 * @param party
	 * @return party edit URL
	 */
	String getPersonsEditUrl(PartySearchResult party);
	
	/**
	 * Get the base URL
	 * @return The base URL
	 */
	String getBaseUrl();
}
